package com.pai4j.common.enums.community;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 程序员七七
 * @webSite https://www.coderutil.com
 * @Date 2022/12/18 02:56
 * @description
 */
@Getter
@AllArgsConstructor
public enum QuestionTypeEnum {

    NORMAL(1, "普通问题"),
    REWARD(2, "悬赏问题");

    private Integer type;
    private String typeName;

    public static boolean isReward(Integer type) {
        return type != null && QuestionTypeEnum.REWARD.type.equals(type);
    }

    public static boolean validateType(Integer type) {
        return QuestionTypeEnum.NORMAL.type.equals(type) ||
                QuestionTypeEnum.REWARD.type.equals(type);
    }
}
